import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'index',
            meta: {
                title: '首页'
            },
            component: function(resolve) {
                require(["../components/index.vue"], resolve);
            }
        },
        {
            path: '/details',
            name: 'details',
            meta: {
                title: '文件详情'
            },
            component: function(resolve) {
                require(["../components/details.vue"], resolve);
            }
        },
        {
            path: '/login',
            name: 'login',
            meta: {
                title: '登录页'
            },
            component: function(resolve) {
                require(["../components/login.vue"], resolve);
            }
        }
    ]
})